# -*- encoding:ascii -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 8
_modified_time = 1357473074.417
_enable_loop = True
_template_filename = 'resources/Lerneinheit.html'
_template_uri = 'resources/Lerneinheit.html'
_source_encoding = 'ascii'
_exports = []


def render_body(context,**pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        selectedThema = context.get('selectedThema', UNDEFINED)
        list = context.get('list', UNDEFINED)
        themenlist = context.get('themenlist', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'\r\n\r\n\r\n<h2>Lerneinheit Erstellen</h2>\r\n<a href="/Lerneinheiten/open">Neue Lerneinheit Erstellen</a> \r\n\r\n  \r\n\r\n<h2>Lerneinheiten Filter</h2> \r\n  <p><a href="/Lerneinheiten/?order=chrono&amp;reverse=False">chronologisch Auflisten neu->alt</a></p>\r\n  <p><a href="/Lerneinheiten/?order=chrono&amp;reverse=True">chronologisch Auflisten alt->neu</a></p>\r\n\r\n\r\n  <form action="/Lerneinheiten/" method="post" accept-charset="utf-8">\r\n\r\n    <label>thematisch Auflisten</label>\r\n   \r\n    <select name="orderbythema" id="Select1">\r\n')
        # SOURCE LINE 19
        for a in themenlist:
            # SOURCE LINE 20
            if a.Bezeichner == selectedThema:
                # SOURCE LINE 21
                __M_writer(u'                <option selected> ')
                __M_writer(unicode(a.Bezeichner))
                __M_writer(u' </option>\r\n')
                # SOURCE LINE 22
            else:
                # SOURCE LINE 23
                __M_writer(u'                <option> ')
                __M_writer(unicode(a.Bezeichner))
                __M_writer(u'  </option>\r\n')
            # SOURCE LINE 25
            __M_writer(u'\r\n         \r\n')
        # SOURCE LINE 28
        __M_writer(u'    </select>\r\n\r\n    <button type="submit">Sort</button>\r\n </form>\r\n\r\n<h2>Lerneinheiten Liste</h2> \r\n<ul>\r\n')
        # SOURCE LINE 35
        for a in list:
            # SOURCE LINE 36
            __M_writer(u'        <li>\r\n            <label>')
            # SOURCE LINE 37
            __M_writer(unicode(a.Bezeichner))
            __M_writer(u' ')
            __M_writer(unicode(a.Termin))
            __M_writer(u'</label>\r\n            <a href="open?LerneinheitNummer=')
            # SOURCE LINE 38
            __M_writer(unicode(a.Nummer))
            __M_writer(u'">Open</a> \r\n            <a href="Remove?LerneinheitNummer=')
            # SOURCE LINE 39
            __M_writer(unicode(a.Nummer))
            __M_writer(u'">Remove</a>   \r\n        </li>\r\n')
        # SOURCE LINE 42
        __M_writer(u'</ul>\r\n\r\n\r\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


